<div id="content">
    <div class="post">
            <h2 class="title"><a href="#">Listado de campañas</a></h2>
               <div class="entry">
                   <?php include_partial('filtro', array('filtro' => $filtro)) ?>
                   <?php include_partial('global/flash'); ?>
                    <table>
                      <thead>
                        <tr>
                          <th>Campaña</th>
                          <th>Lote</th>
                          <th>Fecha siembra</th>
                          <th>Ultimo monitoreo</th>
                          <th>Acciones</th>
                        </tr>
                      </thead>
                      <tbody>
                        <?php $count = 0; foreach ($campanas as $campana): $count++ ?>
                        <tr <?php if($count%2 == 0) echo 'class="odd"' ?>>
                          <td><?php echo $campana ?></td>
                          <td><?php echo $campana->getLote() ?></td>
                          <td><?php echo $campana->getDateTimeObject('fecha_siembra')->format('d/m/Y') ?></td>
                          <?php if($campana->getUltimoMonitoreo() != null) {?>
                          <td class="colResultado"><?php include_partial('color', array('value' => $campana->getUltimoMonitoreo()->getEstadoGeneral()))?></td>
                          <?php } else { ?>
                          <td>No monitoreado</td>
                          <?php } ?>
                          <td>
                              <?php include_partial('global/bar',array('object' => $campana));  ?>
                          </td>
                        </tr>
                        <?php endforeach; ?>
                      </tbody>
                    </table>

               </div>
    </div>
        <div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<!-- begin #sidebar -->
<?php include_partial('global/sidebar', array('object' => $campana)) ?>
<!-- end #sidebar -->

<div style="clear: both;">&nbsp;</div>
<!-- end #page -->